package mines;

import gui.Window;

public class Pointer extends MineType {

	public Pointer(Window window) {
		super(window);
	}

	private int nr = 0;

	public void setNr(int nr) {
		this.nr = nr;
	}

	@Override
	public void action() {
		setText(String.valueOf(nr));
		window.decreaseMines();
	}

	@Override
	public void reveal() {
		if (isEnabled()) {
			setText(String.valueOf(nr));
			pressed();
		}
	}
}
